package com.zte.leave.service.impl;


import com.zte.leave.dao.ILeaveDao;
import com.zte.leave.model.Absence;
import com.zte.leave.model.Leave;
import com.zte.leave.service.ILeaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ILeaveServiceImpl implements ILeaveService {
    @Autowired
    private ILeaveDao leaveDao;

    @Override
    public boolean insertLeave(Leave leave) {
        return leaveDao.insertLeave(leave);
    }
    @Override
    public List<Leave> findAllLeave(Leave leave) {
        return leaveDao.findAllLeave(leave);
    }

    @Override
    public boolean insertAbsence(Absence absence) {
        return leaveDao.insertAbsence(absence);
    }

    @Override
    public List<Absence> findAllAbsence(Absence absence) {
        return leaveDao.findAllAbsence(absence);
    }
}
